<template>
  <div id="score" v-loading.fullscreen.lock="fullscreenLoading"
              element-loading-text="拼命加载中"
    element-loading-spinner="el-icon-loading"
    element-loading-background="rgba(0, 0, 0, 0.2)">
    <el-row type="flex" class="" justify="center">
      <el-col :span="23" class="line">
         <i class="el-icon-search"></i>成绩查询
      </el-col>
    </el-row>
    <div class="content">
      <el-card class="box-card" style="text-align:center;" v-show="tableShow1">
        <div v-show="tipShow">暂无成绩</div>
            <table class="layui-table" >
              <tbody>
                <th colspan="12" style="text-align: center">浙江工商大学“三位一体”评审成绩单</th>
                <tr>
                  <td colspan="2">姓名</td>
                  <td>  
                    {{userbase.name}}
                  </td>
                  <td>身份证号</td>
                  <td colspan="2"> 
                     {{userbase.idnum}}
                  </td>
                  <td >测试类别</td>
                  <td colspan="2">  
                  {{audit.ctype}}               
                  </td> 
                  <td colspan="2">是否专项生</td>
                  <td >  
                  {{audit.spe}}              
                  </td> 
                </tr>
                <tr>
                  <td colspan="2">
                   及格线
                  </td>
                  <td colspan="2">
                    {{audit.base_score}}
                  </td>
                  <td colspan="1">
                   评审分数
                  </td>
                  <td colspan="1">
                    {{audit.score}}
                  </td>
                  <td colspan="2">
                   最终结果
                  </td>
                  <td colspan="4">
                    {{audit.result}}
                  </td>
                </tr>
                <tr>
                  <td colspan="12" style="color:red;">{{audit.msg}}</td>
                </tr>
              </tbody>
            </table>

          

      </el-card>
      <el-card class="box-card" style="text-align:center;margin-top:20px;" v-show="tableShow2">
        <div v-show="tipShow">暂无成绩</div>
           
            <table class="layui-table">
              <tbody>
                <th colspan="12" style="text-align: center">浙江工商大学“三位一体”综合成绩单</th>
                <tr>
                  <td colspan="2">
                   学业水平核算
                  </td>
                  <td colspan="2">
                   面试成绩
                  </td>
                  <td colspan="2">
                   面试名次
                  </td>
                  <td colspan="2">
                    学业水平核算+面试成绩
                  </td>
                  <td colspan="2">
                   总名次
                  </td>
                  <td colspan="2">
                   最终结果
                  </td>
                </tr>
                <tr>
                  <td colspan="2">
                   {{interview.hkscore}}
                  </td>
                  <td colspan="2">
                   {{interview.intscore}}
                  </td>
                  <td colspan="2">
                    {{interview.rank}}
                  </td>
                  <td colspan="2">
                    {{interview.allscore}}
                  </td>
                  <td colspan="2">
                    {{interview.allrank}}
                  </td>
                  <td colspan="2">
                    {{interview.result}}
                  </td>
                </tr>
                <tr>
                  <td colspan="12" style="color:red;">{{interview.msg}}</td>
                </tr>
              </tbody>
            </table>

      </el-card>
     </div>
  </div>
</template>

<script>
  import VDistpicker from 'v-distpicker'
  export default {
    data() {
      return {
        fullscreenLoading:false,
        tableShow1:false,
        tableShow2:false,
        tipShow:false,
        audit:{},
        userbase:{},
        interview:{},

      }
    },
    mounted(){
      this.getInfo()
    },
    methods: {
      getInfo(){
        var that=this;
        this.fullscreenLoading=true;
        this.axios({
          url:this.host+'/3v1t.smserver.cn/index.php/index/student.score/index',
          method:'get',
          headers:{
                "Content-type":"application/json"
          }
        }).then((res)=>{
          console.log(res);
          that.fullscreenLoading=false;
          var data=res.data;
          if(data.audit){
            that.tableShow1=true;
            that.audit=data.audit
            that.userbase=data.audit.userbase//that.fullscreenLoading=false;
          }
          if(data.interview){
            that.tableShow2=true;
            that.interview=data.interview
          }
        })
      },
    }
  }

</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss">
  #score {
    //width:100%;
    //line-height:100%;
    padding: 10px;
    .line {
      border-bottom: 1px solid #ccc;
      text-align: left;
      height: 50px;
      line-height: 50px;
      padding-left: 10px;
    }
    .content {
      padding: 20px;
      text-align: center;
    }
    
    
  }

</style>
